package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapePicMapper;
import com.ruoyi.grape.domain.GrapePic;
import com.ruoyi.grape.service.IGrapePicService;

/**
 * 摄像头图片信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapePicServiceImpl implements IGrapePicService 
{
    @Autowired
    private GrapePicMapper grapePicMapper;

    /**
     * 查询摄像头图片信息
     * 
     * @param picId 摄像头图片信息主键
     * @return 摄像头图片信息
     */
    @Override
    public GrapePic selectGrapePicByPicId(Long picId)
    {
        return grapePicMapper.selectGrapePicByPicId(picId);
    }

    /**
     * 查询摄像头图片信息列表
     * 
     * @param grapePic 摄像头图片信息
     * @return 摄像头图片信息
     */
    @Override
    public List<GrapePic> selectGrapePicList(GrapePic grapePic)
    {
        return grapePicMapper.selectGrapePicList(grapePic);
    }


    /**
     * 查询最近七天摄像头采集到的图片信息
     *
     * @param
     * @return 摄像头图片信息
     */
    @Override
    public List<GrapePic> selectGrapePicByRecentId() {
        return  grapePicMapper.selectGrapePicByRecentId();
    }

    /**
     * 新增摄像头图片信息
     * 
     * @param grapePic 摄像头图片信息
     * @return 结果
     */
    @Override
    public int insertGrapePic(GrapePic grapePic)
    {
        return grapePicMapper.insertGrapePic(grapePic);
    }

    /**
     * 修改摄像头图片信息
     * 
     * @param grapePic 摄像头图片信息
     * @return 结果
     */
    @Override
    public int updateGrapePic(GrapePic grapePic)
    {
        return grapePicMapper.updateGrapePic(grapePic);
    }

    /**
     * 批量删除摄像头图片信息
     * 
     * @param picIds 需要删除的摄像头图片信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePicByPicIds(Long[] picIds)
    {
        return grapePicMapper.deleteGrapePicByPicIds(picIds);
    }

    /**
     * 删除摄像头图片信息信息
     * 
     * @param picId 摄像头图片信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePicByPicId(Long picId)
    {
        return grapePicMapper.deleteGrapePicByPicId(picId);
    }
}
